<script type="text/javascript" src="<?=base_url();?>java_scripts/vote_scripts.js"></script>
	<h3 class="capture">Vote Management</h3>
    <div id="wrap">
    
    <div id="tdd_selected">
    	<div class="dd_selected">Voting Topics</div>
        <div class="dd_view">

      		<table border="0" cellpadding="0" align="center" cellspacing="0" width="95%" class="userview">
      			<tr align="center">
      				<th width="5%">No</th>
      				<th width="40%">Topic Name</th>
      				<th width="30%">Description</th>
      				<th width="10%">Max Item</th>
      				<th width="5%">Item</th>
      				<th width="10%" style="border-right: 1px solid #006295";>Remove</th>
      			</tr>
      			<?php 
      				$color='#DFDFDF';
      				$i=0;
      				foreach($topics->result_array() as $topic){
      				$i+=1;	
      				$color=($color=='#DFDFDF')?'#EFEFEF':'#DFDFDF';
      			?>
      			<tr align="center" bgcolor="<?=$color?>">
      				<td height="25" style="border-left: 1px solid #006295;"><?=$i;?></td>
      				<td align="left"><a href="<?=site_url("vote_management/updateTopicForm/".$topic['top_id'])?>"><?=htmlspecialchars($topic['top_name']);?></a></td>
      				<td align="left"><?=nl2br(htmlspecialchars($topic['top_desc']));?></td>
      				<td><?=htmlspecialchars($topic['top_item_max']);?></td>
      				<td><a href="<?=site_url("vote_management/assignItemForm/".$topic['top_id'])?>">Assign</a></td>
      				<td style="border-right: 1px solid #006295";><img width="15" height="15" onclick="javascript:deleteTopic('<?=site_url("vote_management/deleteTopic/".$topic['top_id'])?>')"  src="<?=base_url()?>images/recyclebin.png"></td>
      			</tr>
      			<?php 
      				}
      			?>
      			<tr>
      				<td colspan="6" style="border-top:1px solid #006295;">&nbsp;</td>
      			</tr>
      			<tr>
      				<td align="left" colspan="6"><input onclick="javascript:window.location='<?=site_url("misc/homepage")?>'" type="button" class="button_back_end" value="Back"/>&nbsp;&nbsp;<input type="button" class="button_back_end" onclick="javascript:window.location='<?=site_url("vote_management/addNewTopicForm")?>'" style="cursor: pointer;" value="Add New"/></td>
      			</tr>
      		</table>
</div>
</div>
</div>